/** 
 * Project Name:sys-portal-Extjs 
 * File Name:ViewModel.js 
 * Package Name: 
 * Author : 吴Yuan|小森森
 * Date:2018年4月24日下午12:45:33 
 * Copyright (c) 2018, 15909910367@163.com All Rights Reserved. 
 * 
 */
Ext.define('Jason.view.protal.module.systemManager.sources.dict.ViewModel', {
    extend: 'Ext.app.ViewModel',
    alias: 'viewmodel.sources_dict_MainViewModel',
    stores: {
        souresDictStore: {
            type: 'souresDictStore'
        },
        dictTreeStore: {
            type: 'tree',
            aotoLoad: true,
            fields: [{
                name: 'text', mapping: 'text', convert: function (v, r) {
                    return v + "[" + r.get('en') + "]"
                }
            }],
            proxy: {
                type: 'ajax',
                url: reqUrl.sys.comboData.treeTwo + '?code=-1',
            },
            root: {
                text: '这是根目录',
                id: 'src',
                expanded: true
            },
            folderSort: true,
            sorters: [{
                property: 'id',
                direction: 'ASC'
            }]
        }
    }
});